package org.wanho.filter;


import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

@WebFilter("/hello")
public class HelloFilter implements Filter {
    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println("HelloFilter在调用目标资源之前，进行拦截处理操作....................");

        // 放行请求
        filterChain.doFilter(servletRequest, servletResponse);


        System.out.println("HelloFilter在调用目标资源之后，进行拦截处理操作....................");

    }
}
